use "$dataDir/dataset_admin_field", replace

*******************************************************************************
*Regressions in levels			
		local depvar "sug_manual_cut sug_mecanic_cut tech_total_cutters"
		local cluslvl "id_mills"

	foreach var in `depvar'{
	reghdfe `var' afterXtreatment, abs(id_mills i.year#i.month) vce(cluster `cluslvl')
		estimates store `var'
		qui sum `var' if e(sample)==1 & year<2015
		local mean1=r(mean)
		estadd scalar mean1 `mean1' : `var'
		estadd local moyearfe "Yes"
		estadd local millfe "Yes"	
		estadd local cluslvl "Mill"		
	}

	esttab sug_manual_cut sug_mecanic_cut tech_total_cutters using "$mainDir/tables/Tab3_main_inputs.tex", replace b(%12.3fc) se(%12.3fc) keep(afterXtreatment) varlabels(afterXtreatment  "After 2015 $\times$ Regulated") label starl(* 0.1 ** 0.05 *** 0.01) stats(mean1 N r2 moyearfe millfe cluslvl, fmt(%12.3fc %12.0fc %12.3fc) label("Pre 2015 Mean" "Obs." "R-squared" "Month by Year FE" "Mill FE" "Cluster level")) nonotes
	
	